<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAkbusMrApplyTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('akbus_mr_apply', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('number')->nullable()->comment('单号');
            $table->integer('line')->nullable()->comment('线路');
            $table->string('license_plate_num')->nullable()->comment('车牌号');
            $table->date('date')->nullable()->comment('日期');
            $table->unsignedInteger('user_id')->nullable()->comment('用户ID');
            $table->decimal('appraisal', 10, 2)->nullable()->comment('评估金额');
            $table->string('repairer')->nullable()->comment('维修厂');
            $table->dateTime('enter_at')->nullable()->comment('进厂时间');
            $table->dateTime('out_at')->nullable()->comment('出厂时间');
            $table->string('description')->nullable()->comment('描述/维修情况');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('akbus_mr_apply');
    }
}
